package net.aetherial.context.grounding.annotators;

import java.util.*;

import net.aetherial.context.grounding.estimators.*;

/**
 * Abstract class for constructing annotators.
 */

public abstract class Annotator 
{
	public static String DEFAULT_LAYER = "Default Layer";

	/**
	 * Returns a layer's name.
	 * 
	 * @return		Layer name.
	 */
	
	public abstract String getLayerName ();
	
	/**
	 * Generates an annotated layer.
	 * 
	 * @param sender		Sender / speaker.
	 * @param contribution	Conversational unit.
	 * @param score			Coded score (optional).
	 * @return				Annotated layer.
	 */
	
	public Map<String, Object> annotate (String sender, String contribution, double score)
	{
		HashMap<String, Object> layer = new HashMap<String, Object> ();
		
		layer.put (Estimator.SCORE_KEY, score);
		layer.put (Estimator.SENDER_KEY, sender);
		layer.put (Estimator.CONTRIBUTION_KEY, contribution);

		return layer;
	}
}
